<script setup lang="ts">
import type { BaseWindow } from './class/basewindow'
import View3DWindow from './view3d/View3DWindow.vue'

const windowMap: any = {
  view3d: View3DWindow,
}

defineProps<{
  data: BaseWindow
}>()
</script>

<template>
  <component :is="windowMap[data.category]" :data="data"></component>
</template>

<style scoped lang="less">
.window {
  & > header {
    height: 2.1875rem;
    line-height: 2.1875rem;
    background-color: #353535;
    display: flex;
    & > * {
      margin: 0 1rem;
    }
  }
  & > article {
    background-color: #3c3c3c;
  }
}
</style>
